module EXT (
    input logic [15:0]imm_16,
    input logic [1:0]ID_EXTOp,
    output logic [31:0]imm_32
);
    always_comb begin
        unique case(ID_EXTOp)
        2'b00:
            imm_32 = {{16{1'b0}},{imm_16}};
        2'b01:
            imm_32 = {{16{imm_16[15]}},{imm_16}};
        2'b10:
            imm_32 = {{imm_16},{16{1'b0}}};
        default:
            imm_32 = 32'bx;
        endcase
    end
endmodule